package com.zoke.daycarpool.dialog;

import android.content.Context;

import com.zoke.daycarpool.R;
import com.zoke.support.base.BaseActivity;
import com.zoke.support.view.FlippingLoadingDialog;

/**
 * loading状态
 * 
 * @author JackWu
 * @version
 * @date 2014-11-17
 * @_QQ_ 651319154
 */
public class AppLoadingDialog extends FlippingLoadingDialog {

	private Context mContext;

	public AppLoadingDialog(Context context, String text) {
		super(context, text);
		mContext = context;
		mFivIcon.setBackgroundResource(R.drawable.logo);
	}

	@Override
	public void onBackPressed() {
		super.onBackPressed();
		// 返回取消并销毁界面
		dismiss();
		try {
			// 如果取消弹框 则关闭界面 ？
			BaseActivity act = (BaseActivity) mContext;
			act.onBackPressed();
		} catch (Exception e) {
		}
	}

}
